package com.etsii.android.servidor;


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

public class InitServidorActivity extends Activity {

	static int puerto;
	static int maxPlazas;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    	
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    public void buttonplayServidorOnClick(View target) {
    	EditText textPuerto = (EditText) findViewById(R.id.puerto);
    	EditText textPlazas = (EditText) findViewById(R.id.maxPlazas);
	
    	puerto = Integer.parseInt(textPuerto.getText().toString());
        maxPlazas = Integer.parseInt(textPlazas.getText().toString());
    	
    	Intent i = new Intent(this, ServidorAgenciaActivity.class); //al pulsar el boton sale la activity ServidorAgencia
    	startActivity(i);
    }
}